$OpenBSD: patch-CMakeLists_txt,v 1.2 2014/09/15 17:10:45 brad Exp $

binlog code now is optional, disabled by default

http://bazaar.launchpad.net/~perconardba/mydumper/0.6/revision/144

--- CMakeLists.txt.orig	Tue Feb 25 10:18:05 2014
+++ CMakeLists.txt	Sun Sep 14 12:32:25 2014
@@ -16,8 +16,10 @@ if (BUILD_DOCS)
   add_subdirectory(docs)
 endif (BUILD_DOCS)
 
-set(CMAKE_C_FLAGS "-Wall -Wno-deprecated-declarations -Wunused -Wwrite-strings -Wno-strict-aliasing -Wextra -Wshadow -Werror -O3 -g ${MYSQL_CFLAGS}")
+option(WITH_BINLOG "Build binlog dump options" OFF)
 
+set(CMAKE_C_FLAGS "-Wall -Wno-deprecated-declarations -Wunused -Wwrite-strings -Wno-strict-aliasing -Wextra -Wshadow -Werror ${MYSQL_CFLAGS}")
+
 include_directories(${MYDUMPER_SOURCE_DIR} ${MYSQL_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR} ${PCRE_INCLUDE_DIR} ${ZLIB_INCLUDE_DIRS})
 
 if (NOT CMAKE_INSTALL_PREFIX)
@@ -27,9 +29,15 @@ MARK_AS_ADVANCED(CMAKE)
 
 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/config.h)
 
-add_executable(mydumper mydumper.c binlog.c server_detect.c g_unix_signal.c)
-target_link_libraries(mydumper ${MYSQL_LIBRARIES_mysqlclient_r} ${GLIB2_LIBRARIES} ${GTHREAD2_LIBRARIES} ${PCRE_PCRE_LIBRARY} ${ZLIB_LIBRARIES})
 
+if (WITH_BINLOG)
+  add_executable(mydumper mydumper.c binlog.c server_detect.c g_unix_signal.c)
+else (WITH_BINLOG)
+  add_executable(mydumper mydumper.c server_detect.c g_unix_signal.c)
+endif (WITH_BINLOG)
+target_link_libraries(mydumper ${MYSQL_LIBRARIES} ${GLIB2_LIBRARIES} ${GTHREAD2_LIBRARIES} ${PCRE_PCRE_LIBRARY} ${ZLIB_LIBRARIES})
+
+
 add_executable(myloader myloader.c)
 target_link_libraries(myloader ${MYSQL_LIBRARIES_mysqlclient_r} ${GLIB2_LIBRARIES} ${GTHREAD2_LIBRARIES} ${PCRE_PCRE_LIBRARY} ${ZLIB_LIBRARIES})
 
@@ -55,6 +63,7 @@ MESSAGE(STATUS "--------------------------------------
 MESSAGE(STATUS "MYSQL_CONFIG = ${MYSQL_CONFIG}")
 MESSAGE(STATUS "CMAKE_INSTALL_PREFIX = ${CMAKE_INSTALL_PREFIX}")
 MESSAGE(STATUS "BUILD_DOCS = ${BUILD_DOCS}")
+MESSAGE(STATUS "WITH_BINLOG = ${WITH_BINLOG}")
 MESSAGE(STATUS "RUN_CPPCHECK = ${RUN_CPPCHECK}")
 MESSAGE(STATUS "Change a values with: cmake -D<Variable>=<Value>")
 MESSAGE(STATUS "------------------------------------------------")
